import request from '../../../../../public/js/common/api/api.js'

const AccountUrl = Utils.CurDomain.AccountUrl;
const _ajaxOptions = {
    contentType: 'application/json',
    dataType: 'json',
    async: true,
    dataFilter(data, type) {
        return data;
    }
};

export default class UpdatePasswordApi {

    //TODO :获取用户关联员工信息
    static queryUserInfo() {
        return request.get(`${AccountUrl}/accounts/eply`);
    }

    //TODO : 验证用户手机号 
    static verifyPhoneNumber(phone) {
        return request.post(`${AccountUrl}/accounts/verify/${phone}`, undefined, { "disTooltips": true })
    }

    //TODO : 验证验证码
    static verifyVcode(PhoneNum, Vcode) {
        return request.post(`${AccountUrl}/accounts/verify/${PhoneNum}/${Vcode}`, undefined);
    }

    //TODO:获取公钥
    static getPuk() {
        return request.get(`${AccountUrl}/accounts/raspuk`)
    }

    //TODO : 使用guid修改密码
    static UpdatePasswordByGuid(guid, data) {
        return request.post(`${AccountUrl}/accounts/mm/${guid}`, data)
    }
    //TODO : 获取jwt
    //static getToken() {
    //    return request.get(`${BaseCfgUrl}/testtoken`)
    //}
}